package com.learn.designPatterns.structuralType.FlyWeight;

/**
 * @classname:
 * @Description:
 * @author: yfpu
 * @Date: 2018-10-31 16:37
 */
public class ConcreteFlyWeight implements FlyWeight{

    private String intrinsicState;

    public ConcreteFlyWeight(String intrinsicState) {
        this.intrinsicState = intrinsicState;
    }

    @Override
    public void doOperation(String extrinsicState) {
        System.out.println("Object address: " + System.identityHashCode(this));
        System.out.println("IntrinsicState: " + intrinsicState);
        System.out.println("ExtrinsicState: " + extrinsicState);

    }
}
